Sniffaccess notifications

Sniffaccess can register to be notified upon the execution of actions in SNiFF+. The notification registration requests allow you to register for specific actions.
Notification registration requests

- register

PROJECT_NAME ACTION_PATTERN ("PRE" | "POST") ("WAIT" | "NOWAIT") SHELL_COMMAND
Register for a notification. Please refer to Notification ACTIONs and ARGUMENTs for a list of possible ACTIONS . The SHELL_COMMAND is called (notified) upon the execution of a registered action.

- unregister
PROJECT_NAME ACTION_PATTERN ("PRE" | "POST")
Unregister for a notification. Below you can find a list of possible ACTION_PATTERNs. If the action is not registered, a warning is displayed.

ACTION_PATTERN is a pattern that must match one or more ACTION s as shown in Notification ACTIONs and ARGUMENTs and can contain the following wildcard characters:

Wildcard character | Match
* | any number of characters
? | a single character
[a-zA-Z] | a single character in the given range of characters
[^...] or [!...] | a single character NOT in the given range of characters

What happens when SNiFF+ sends a notification?
When SNiFF+ sends a notification, Sniffaccess calls the shell command (

SHELL_COMMAND ) that has been supplied with a notification registration. The notification registration arguments PRE and POST determine when a shell command is called. PRE means that Sniffaccess is notified before a registered action is executed in SNiFF+; POST means that Sniffaccess is notified after a registered action is executed.
A PRE notification can have either WAIT or NOWAIT status. When Sniffaccess calls the shell command of a PRE WAIT notification, SNiFF+ waits for the shell command to finish before the action is executed. If the return value of the shell command is zero (0), the action is executed; otherwise SNiFF+ does not execute the action. Thus a PRE WAIT notification shell command can control whether SNiFF+ can execute registered actions. When an action is blocked via the Sniffaccess interface, a dialog informs the user about the block.
The shell command is called with the following arguments:
SHELL_COMMAND ("PRE"|"POST") ("WAIT"|"NOWAIT") ACTION {ARGUMENT}
The possible ACTION s and ARGUMENT s are described below.
Notification ACTIONs and ARGUMENTs
The following shows the possible ACTION s and ARGUMENTS for notification registration requests. Each item also represents the argument of the shell command which is called by Sniffaccess upon notification of an action execution.

- save_file

PROJECT_NAME FILE
SNiFF+ saves a file.

- edit_file
PROJECT_NAME FILE
SNiFF+ loads a file into the Source Editor.

- checkout_file
PROJECT_NAME FILE ("EXCLUSIVE" | "CONCURRENT" | "NOLOCK") [VERSION_OR_SYMBOL]
SNiFF+ checks out a file.

- checkin_file
PROJECT_NAME FILE ("UNLOCK" | "LOCK") [VERSION_OR_SYMBOL COMMENT]
SNiFF+ checks in a file.

- lock_file
PROJECT_NAME FILE ("EXCLUSIVE" | "CONCURRENT") [VERSION_OR_SYMBOL]
SNiFF+ locks a file.

- unlock_file
PROJECT_NAME FILE [VERSION_OR_SYMBOL]
SNiFF+ calls make for a file.

- make_file
PROJECT_NAME FILE
SNiFF+ calls make for a file.

- make_project
PROJECT_NAME [TARGET]
SNiFF+ calls make for a project.

- open_project
PATH
SNiFF+ opens a project.

- close_project
PROJECT_NAME
SNiFF+ closes a project.

- quit
SNiFF+ quits.

The following shows the possible

ACTION s for POST notification registration requests. Each item also represents the argument of the shell command which is called by Sniffaccess after notification of an action execution.

- add_subproject

PROJECT_NAME PATH
SNiFF+ adds a subproject to a project.

- remove_subproject
PROJECT_NAME PROJECT_NAME
SNiFF+ removes a subproject from a project.

- add_file
PROJECT_NAME FILE
SNiFF+ adds a file to a project.

- remove_file
PROJECT_NAME FILE
SNiFF+ removes a file from a project.